Remus: Fixup for tap:tapdisk syntax in remus uname
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 9 Nov 2009 19:41:16 +0000 (19:41 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 9 Nov 2009 19:41:16 +0000 (19:41 +0000)
Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
tools/python/xen/xend/server/BlktapController.py

index d1cc786f8fef6b3645928cbbbe4c67e30dfd820f..d6b07c1ff68cb116cc981d189b1589ed32da8efa 100644 (file)
@@ -172,6 +172,8 @@ class Blktap2Controller(BlktapController):
         uname = config.get('uname', '')
         try:
             (typ, subtyp, params, file) = string.split(uname, ':', 3)
+            if subtyp not in ('tapdisk', 'ioemu'):
+                raise ValueError('invalid subtype')
         except:
             (typ, params, file) = string.split(uname, ':', 2)
             subtyp = 'tapdisk'